package analiseSemantica;

public class Decls extends Node {
	
	public VarDecl varDeclLisRef = null;       //ira apontar para umas lista de varDecl
	public FuncDecl funcDeclRef = null;       // ira apontar para uma lista de funcDeclRef
	public Decls declsRef = null;
	public int type;
	public String id;
	public int cat;
	//public int line;
	


     public Decls(int type , String id , int cat, Object ob , Object ob2) {
            this.type = type;
            this.id  = id;
            this.cat = cat;
            
         
            if ( ob instanceof VarDecl)
             this.varDeclLisRef = (VarDecl) ob;

            if ( ob instanceof FuncDecl )
                  this.funcDeclRef = (FuncDecl) ob;

            if ( ob2 instanceof Decls )
                  this.declsRef = (Decls) ob2;
            
      }



     public Decls(int type , String id , int cat, Object ob) {
    	 this.type = type;
    	 this.id  = id;
    	 this.cat = cat;
    	 
    	 
    	 if ( ob instanceof FuncDecl )
                  this.funcDeclRef = (FuncDecl) ob;
    }

    public Decls getDeclsRef() {
    	return declsRef;
    }

    public void setDeclsRef(Decls declsRef) {
    	this.declsRef = declsRef;
    }

    public FuncDecl getFuncDeclRef() {
    	return funcDeclRef;
    }

    public void setFuncDeclRef(FuncDecl funcDeclRef) {
    	this.funcDeclRef = funcDeclRef;
    }

    public VarDecl getVarDeclLisRef() {
    	return varDeclLisRef;
    }

    public void setVarDeclLisRef(VarDecl varDeclLisRef) {
    	this.varDeclLisRef = varDeclLisRef;
    }

    public int getCat() {
    	return cat;
    }

    public void setCat(int cat) {
    	this.cat = cat;
    }

    public String getId() {
    	return id;
    }

    public void setId(String id) {
    	this.id = id;
    }

    public int getType() {
    	return type;
    }

    public void setType(int type) {
    	this.type = type;
    }

}
